package com.bytedance.ttnet.hostmonitor;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class HostMonitorBR extends BroadcastReceiver {
    public HostMonitorBR() {

    }

    public void a(HostStatus arg5) {
        String v0 = "HostMonitorBR";
        String v1 = "host status changed: " + arg5;
        if(com.bytedance.ttnet.hostmonitor.Logger.b.a().a.compareTo(Logger.LogLevel.INFO) <= 0) {
            com.bytedance.ttnet.hostmonitor.Logger.b.a();
            Log.i(v0, v1);
        }
    }

    public void onReceive(Context arg3, Intent arg4) {
        try {
            String v0_1 = new e(arg3).c();
            if(arg4 == null) {
                return;
            }

            if(v0_1 == null) {
                return;
            }

            if(!arg4.getAction().equals(v0_1)) {
                return;
            }

            this.a((HostStatus) arg4.getParcelableExtra("HostStatus"));
        }
        catch(Throwable v0) {
            v0.printStackTrace();
        }
    }
}

